<?php
    include_once("functions_bandwidth.php");
    include_once("datefunctions.php");

    $Einde = date("Y/m/d") . " 23:59:59";
    $Start = date("Y/m/d") . " 00:00:00";
    $Start = DateAdd("d", -6, $Start);
    $Start = date("Y/m/d", $Start) . ' 00:00:00' ;

    $bw = func_bw_total_volume_periode_day_graph_7days($Start, $Einde);

    //  http://chart.apis.google.com/chart?chxt=y&chxr=0,0,10000&cht=bvs&chd=t:' . $bw[0][0] . ',' . $bw[1][0] . ',' . $bw[2][0] . ',' . $bw[3][0] . ',' . $bw[4][0] . ',' . $bw[5][0] . ',' . $bw[6][0] . '&chs=700x200&chl='  '&chbh=20,30&chco=4D89F9

print "<chart>";
print "<chart_type>column</chart_type>";
print "<chart_border left_thickness='1' top_thickness='0' bottom_thickness='1' />";
print "<axis_category size='10' />";
print "<axis_value size='10' />";
print "<legend layout='hide' />";
print "<chart_data>
  <row>
	 <null/>
	 <string>" . $bw[0][1] . '-' . $bw[0][2] . "</string>
	 <string>" . $bw[1][1] . '-' . $bw[1][2] . "</string>
	 <string>" . $bw[2][1] . '-' . $bw[2][2] . "</string>
	 <string>" . $bw[3][1] . '-' . $bw[3][2] . "</string>
     <string>" . $bw[4][1] . '-' . $bw[4][2] . "</string>
	 <string>" . $bw[5][1] . '-' . $bw[5][2] . "</string>
	 <string>" . $bw[6][1] . '-' . $bw[6][2] . "</string>
  </row>
  <row>
	 <string>Region A</string>
	 <number>" . $bw[0][0] . "</number>
     <number>" . $bw[1][0] . "</number>
	 <number>" . $bw[2][0] . "</number>
     <number>" . $bw[3][0] . "</number>
	 <number>" . $bw[4][0] . "</number>
     <number>" . $bw[5][0] . "</number>
	 <number>" . $bw[6][0] . "</number>
  </row>
</chart_data>";
print "</chart>";
?>
